#include "Global.h"

void SDL_RenderDrawEllipse(SDL_Renderer* renderer, SDL_Rect* dst)
{
    int ahalf = dst->w/2;
    int bhalf = dst->h/2;

    float x =0;
    float y = 0;

    for (float angle=0;angle<360;angle+=0.1)
    {
        x=dst->x + ahalf+ahalf* SDL_cosf(angle);
        y = dst->y +bhalf+bhalf* SDL_sinf(angle);
        SDL_RenderDrawPointF(renderer,x,y);
    }

}

void SDL_RenderDrawTriangle(SDL_Renderer* render, SDL_Rect* dst)
{
    SDL_Point array[4]={
        dst->x,dst->y,
        dst->x,dst->y+dst->h,
        dst->x+dst->w,dst->y+dst->h,
        dst->x,dst->y,
    };
    SDL_RenderDrawLines(render,array,4);
}
